package com.engine4cloud.tdf.supervision.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.engine4cloud.tdf.common.data.web.response.PageInfo;
import com.engine4cloud.tdf.supervision.dto.SpOutApplicationVerifyDTO;
import com.engine4cloud.tdf.supervision.dto.create.SpOutApplicationCreateDTO;
import com.engine4cloud.tdf.supervision.dto.query.SpOutApplicationQueryDTO;
import com.engine4cloud.tdf.supervision.dto.result.SpOutApplicationResultDTO;
import com.engine4cloud.tdf.supervision.dto.update.SpAllPreActionUpdateDTO;
import com.engine4cloud.tdf.supervision.dto.update.SpOutApplicationUpdateDTO;
import com.engine4cloud.tdf.supervision.entity.SpOutApplicationEntity;

import java.util.List;

public interface SpOutApplicationService extends IService<SpOutApplicationEntity> {
    PageInfo<SpOutApplicationResultDTO> pageList(SpOutApplicationQueryDTO dto);

    Boolean create(SpOutApplicationCreateDTO dto);

    Boolean update(SpOutApplicationUpdateDTO dto);

    SpOutApplicationResultDTO getById(Long id);

    /**
     * 根据流程编号查询外出申请单
     *
     * @param batch 流程编号
     * @return SpOutApplicationResultDTO
     */
    SpOutApplicationResultDTO getByBatch(String batch);

    /**
     * 销假
     *
     * @param code 流程编号
     * @return Boolean
     */
    Boolean close(String code);

    List<SpOutApplicationResultDTO> findListByPreActions(SpOutApplicationVerifyDTO dto);

    void changeAction(SpAllPreActionUpdateDTO dto);

    Boolean escalation(Long id);
}